package cntedu.sp04.feign;

import cn.tedu.sa01.pojo.User;
import cn.tedu.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "user-server")
public interface UserClient {
    @GetMapping("/{userId}")
    JsonResult<User> getUserId(@PathVariable Integer userId);
    @GetMapping("/{userId}/score")
    JsonResult<?>addScore(@PathVariable Integer userId,
                          @RequestParam("score") Integer score);
}
